package com.frank.appsmanager;

import java.util.Comparator;

public class AppInfoComparator implements Comparator<AppInfo> {

	@Override
	public int compare(AppInfo lhs, AppInfo rhs) {

		if (!lhs.getAppName().equals(rhs.getAppName())) {
			return lhs.getAppName().compareTo(rhs.getAppName());
		} else {
			return lhs.getPackageName().compareTo(rhs.getPackageName());
		}

	}

}
